package com.tanhua.common.utils;

import com.tanhua.common.pojo.User;

/**
 * * @title: UserThreadLocal
 *
 * @Author Philcan
 * @Date: 2021/8/11 20:05
 * @Version 1.0
 */
public class UserThreadLocal {
    private static final ThreadLocal<User> LOCAL = new ThreadLocal<>();

    private UserThreadLocal() {
    }

    public static void set(User user) {
        LOCAL.set(user);
    }

    public static User get() {
        return LOCAL.get();
    }

    public static void remove() {
        LOCAL.remove();
    }
}
